import config from "@/config";
import http from "@/utils/request";

export default {
	// 分页查询课程表
	list: {
		url: `${config.API_URL}/college/course/page`,
		name: "数据列表",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	// 分页查询套餐选择课程列表
	findMenuSelectCourse: {
		url: `${config.API_URL}/college/course/findMenuSelectCourse`,
		name: "数据列表",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
	//新增课程表
	course: {
		url: `${config.API_URL}/college/course`,
		name: "新增课程表",
		post: async function (params) {
			return await http.post(this.url, params, {
				headers: {
					"content-type": "multipart/form-data",
				},
			});
		},
	},
	//删除课程表
	delete: {
		url: `${config.API_URL}/college/course/delete`,
		name: "删除课程表",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},
	//修改课程表
	update: {
		url: `${config.API_URL}/college/course/update`,
		name: "修改课程表",
		get: async function (params) {
			return await http.post(this.url, params, {
				headers: {
					"content-type": "multipart/form-data",
				},
			});
		},
	},
	//获取课程详情
	updateGetDetail: {
		url: `${config.API_URL}/college/course/updateGetDetail`,
		name: "获取课程详情",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},

	// 添加班级
	addClassGrade: {
		url: `${config.API_URL}/college/grade`,
		name: "添加班级",
		post: async function (params) {
			return await http.post(this.url, params);
		},
	},

	// 查询课程大纲
	findByCourseId: {
		url: `${config.API_URL}/college/course-outline/findByCourseId`,
		name: "查询课程大纲",
		get: async function (params) {
			return await http.get(this.url, params);
		},
	},
	// 启停课程
	modifyState: {
		url: `${config.API_URL}/college/course/modifyState`,
		name: "启停课程",
		get: async function (params) {
			return await http.post(this.url, params);
		},
	},
};
